package com.hotel.system.service.impl;

import com.hotel.common.utils.ShiroUtils;
import com.hotel.system.domain.hotel.Expenses;
import com.hotel.system.domain.hotel.HotelInventory;
import com.hotel.system.domain.hotel.HotelInventoryLog;
import com.hotel.system.mapper.ExpensesMapper;
import com.hotel.system.mapper.SysKcglMapper;
import com.hotel.system.mapper.SysUserPostMapper;
import com.hotel.system.service.ExpensesService;
import com.hotel.system.service.ISysKcglService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 岗位信息 服务层处理
 * 
 * @author hotel
 */
@Service
public class ExpensesServiceImpl implements ExpensesService
{


    @Autowired
    private ExpensesMapper expensesMapper;

    @Autowired
    private SysUserPostMapper userPostMapper;

    /**
     * 查询岗位信息集合
     * 
     * @param post 岗位信息
     * @return 岗位信息集合
     */
    @Override
    public List<Expenses> selectExpensesList(Expenses expenses)
    {
        return expensesMapper.selectExpensesList(expenses);
    }

    @Override
    public int insertExpenses(Expenses expenses)
    {
        expenses.setDeptId(ShiroUtils.getSysUser().getDeptId());
        expenses.setCreateBy(ShiroUtils.getLoginName());
        expenses.setUpdateBy(ShiroUtils.getLoginName());
        return expensesMapper.insertExpenses(expenses);
    }

    @Override
    public Expenses selectExpensesId(String id)
    {

        return expensesMapper.selectExpensesId(id);
    }

    @Override
    public int updateExpenses(Expenses expenses)
    {
        return expensesMapper.updateExpenses(expenses);
    }


}
